]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
appDisplay: Avoid double slash when creating default folders
authorAdam Williamson <awilliam@redhat.com>
Tue, 15 Mar 2022 20:25:16 +0000 (13:25 -0700)
committerMarge Bot <marge-bot@gnome.org>
Sun, 20 Mar 2022 21:50:25 +0000 (21:50 +0000)
Creating these default folders still doesn't work. After some
investigation I found that's because the template we use for
the path when creating the `child` `Gio.Settings` instance
results in a double slash - it comes out as e.g.
/org/gnome/desktop/app-folders//folders/Utilities/ . dconf does
not gracefully handle this as many other things that handle
paths do, it considers it a programmer error. It results in
error messages like:

dconf_changeset_set: assertion 'dconf_is_path (path, NULL)' failed

which is slightly confusing. Anyway, we fix it by removing a
slash from the template.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2242>

js/ui/appDisplay.js

index 116e9931d8916aaa211e813bd3bfa7383db29438..4fa2a5f6314fd9a4bdf52e7f5c8fb8e2d99d715a 100644 (file)
@@ -1471,7 +1471,7 @@ class AppDisplay extends BaseAppView {
             const { name, categories, apps } = DEFAULT_FOLDERS[folder];
             const child = new Gio.Settings({
                 schema_id: 'org.gnome.desktop.app-folders.folder',
-                path: `${path}/folders/${folder}/`,
+                path: `${path}folders/${folder}/`,
             });
             child.set_string('name', name);
             child.set_boolean('translate', true);